import { http } from '../http/HttpTools'
import { ContentType} from '../http/HttpConfig';
import { MallTopicsBean } from '../../home/bean/MallTopicsBean';
import { AdvertisementBean } from '../../home/bean/AdvertisementBean';
import { MallProductsBean } from '../../home/bean/MallProductsBean';
import BaseResponse from '../http/BaseResponse';

export class CloudMallApi {
  //系统基础信息
    getLivePlatform(data) {
    return http.Get(`/live/api/livePlatform/getInfo`, data)
  };

  //广告
   getMallAdvertisement(data): Promise<BaseResponse<AdvertisementBean>> {
    return http.Get<AdvertisementBean>(`/liveVideo/api/mallAdvertisement/queryPage`, data, {
      contentType: ContentType.HTTP
    })
  };

  //9宫格菜单
   getMallTopics(data): Promise<BaseResponse<MallTopicsBean>> {
    return http.Get<MallTopicsBean>(`/liveProduct/api/mallTopic/getMallTopics`, data, {
      contentType: ContentType.HTTP
    })
  };

  //商品
   getMallProducts(data): Promise<BaseResponse<MallProductsBean>> {
    return http.Get<MallProductsBean>(`/liveProduct/api/product/mallProducts`, data, {
      contentType: ContentType.HTTP
    })
  };
}

export default new CloudMallApi()